Feat: Enable globs & comments in exclude file - #26
Merged
MaximilianSoerenPollak merged 3 commits intoSep 8, 2026
Merged
Conversation
MaximilianSoerenPollak
requested review from
AlexanderLanin,
dcalavrezo-qorix and
nradakovic
as code owners
September 3, 2026 09:06
PiotrKorkus
previously approved these changes
Sep 3, 2026
PiotrKorkus
left a comment
There was a problem hiding this comment.
great improvement in exclusion file readability
10 tasks
There was a problem hiding this comment.
🟡 Changes recommended
The unresolved performance, compatibility, error-handling, and test-coverage issues must be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds glob patterns and comments to copyright-checker exclusion files.
Changes:
- Expands workspace-relative exclusion globs.
- Ignores comments and blank lines.
- Adds recursive-glob integration coverage.
Review findings:
- Moderate: Use a set for exclusion lookups to avoid O(inputs × exclusions) scanning.
- Moderate: Test unmatched globs and the resulting
valid=Falsebehavior. - Moderate: Preserve support for literal filenames containing glob metacharacters.
- Moderate: Handle invalid glob patterns without crashing the CLI.
- Nit: Document glob syntax, comments, and workspace-relative resolution in
README.md.
File summaries
| File | Description |
|---|---|
cr_checker/tool/cr_checker.py |
Implements exclusion parsing and glob expansion. |
cr_checker/tests/test_cr_checker.py |
Tests recursive globs, comments, and literal exclusions. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 5
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+207
to
+210
| if not matches: | ||
| LOGGER.error("Exclusion pattern %s matched nothing.", item) | ||
| valid = False | ||
| continue |
Contributor
Author
There was a problem hiding this comment.
Good finding. WIll include a test for it.
Comment on lines
+206
to
+210
| matches = {str(match) for match in workspace_dir.glob(item)} | ||
| if not matches: | ||
| LOGGER.error("Exclusion pattern %s matched nothing.", item) | ||
| valid = False | ||
| continue |
Comment on lines
+180
to
+184
| Lines may be either a literal path or a glob pattern. A line containing | ||
| any of ``*``, ``?`` or ``[`` is expanded with `Path.glob` relative to the | ||
| same base directory; ``**`` matches zero or more directory levels, so | ||
| ``.claude/**/*`` excludes every file and sub-directory below ``.claude`` | ||
| at any depth. A literal path must point at an existing file, as before. |
AlexanderLanin
previously approved these changes
Sep 8, 2026
Contributor
Author
|
@AlexanderLanin I'm fixing some of the copilot findings right now. Will ping you once I pushed it. |
MaximilianSoerenPollak
dismissed stale reviews from AlexanderLanin and PiotrKorkus
via
September 8, 2026 09:49
1a8317f
AlexanderLanin
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable usage of
globslikeignored-dir/**/*in the excluded_files file.Also enable comments, making organization of the file easier